package com.aiju.base.aplication;

import com.aiju.app.AppLaunchInit;
import com.aiju.app.DataProvider;
import com.aiju.app.callback.InitCallback;
import com.aiju.bean.AJUserLogin;
import com.aiju.common.ActivityStack;
import com.aiju.utils.L;
import com.aiju.widgit.config.AiJuConfig;

/**
 * @author: 佐为
 * @date: 2016-11-10 09:53
 * @version: V1.0
 * @Description: 初始化一些基础信息，第三方库
 */
public class BaseApplication extends AbsApplication {

    @Override
    public void onCreate() {
        super.onCreate();
        AppLaunchInit.init(new DataProvider(this), new InitCallback() {
            @Override
            public void onSuccess() {
                L.d("初始化成功");
            }

            @Override
            public void onFailure(int code, String errorMessage) {
                L.d("初始化失败" + errorMessage);
            }
        });
/*        CrashHandler crashHandler = CrashHandler.getInstance();
        crashHandler.init(this);*/
        AJUserLogin.mUIConfig=new AiJuConfig();
    }

    @Override
    public void onTerminate() {
        ActivityStack.finishAll();
        super.onTerminate();
    }

}
